package com.open.demo.span;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.text.style.ReplacementSpan;

public class SingleWarpSpan extends ReplacementSpan {

    private FontAnimReplacementSpan span;

    public SingleWarpSpan(FontAnimReplacementSpan span) {
        this.span = span;
    }

    @Override
    public int getSize(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) {
        return span.getSize(paint, text, start, end, fm);
    }

    @Override
    public void draw(Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, Paint paint) {
        span.draw(canvas, text, start, end, x, top, y, bottom, paint);
    }

    public void setAlpha(float value) {
        span.setAlpha(value);
    }

    public void setScaleX(float scaleX) {
        span.setScaleX(scaleX);
    }

    public void setScaleY(float scaleY) {
        span.setScaleY(scaleY);
    }

    public void setTranslateX(float translateX) {
        span.setTranslateX(translateX);
    }

    public void setTranslateY(float translateY) {
        span.setTranslateY(translateY);
    }

    public void setRotate(float rotate) {
        span.setRotate(rotate);
    }

    public void setColor(int color) {
        span.setColor(color);
    }

}